﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PengPertanyaan.aspx.cs" Inherits="SIAKAD.Dosens.PengPertanyaan" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>SIAKAD - DOSEN</title>

    <!-- normalize.css -->
    <link href="../Content/normalize.css" rel="stylesheet" />

    <!-- Bootstrap -->
    <link href="../Content/bootstrap.min.css" rel="stylesheet" />

    <!-- SIAKAD style -->
    <link href="../Content/Css/Siakad.css" rel="stylesheet" />

    <!-- Login style -->
    <link href="../Content/Css/Login.css" rel="stylesheet" />
    
    <!-- jQuery -->
    <script src="../Scripts/jquery-2.1.0.min.js"></script>
    <script src="../Scripts/bootstrap.min.js"></script>

    <!-- SIAKAD script -->
    <script src="../Scripts/Js/Siakad.js"></script>

    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <form id="frmPengPertanyaan" runat="server">
        <!-- navbar -->
        <div class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="#">SIAKAD</a>
                </div>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li><a href="../Dosen.aspx">Home</a></li>
                    </ul>
                    <ul class="nav navbar-nav pull-right">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><asp:Literal ID="litName" runat="server" />&nbsp;<b class="caret"></b></a>
                            <ul class="dropdown-menu pull-right">
                                <li><asp:LinkButton ID="lnkLogout" runat="server" Text="Logout" OnClick="lnkLogout_Click" /></li>                     
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="container">
            <asp:ScriptManager ID="scriptManager" runat="server" />
                <div class="page-header">
                    <h1>Pengaturan Pertanyaan</h1>
                </div>

                <asp:UpdatePanel ID="upCrudGrid" runat="server">
                    <ContentTemplate>
                        <div class="modal-body">
                            <div class="form-group">
                                <label for="ddlPilihTahun">Tahun</label>
                                <asp:DropDownList ID="ddlPilihTahun" runat="server" CssClass="form-control"  AutoPostBack="true" />
                                <asp:HiddenField ID="hfPilihTahun" runat="server" />
                            </div>

                            <div class="form-group">
                                <label for="ddlPilihPertanyaan">Pertanyaan</label>
                                <asp:DropDownList ID="ddlPilihPertanyaan" runat="server" CssClass="form-control"  AutoPostBack="true" />
                                <asp:HiddenField ID="hfPilihPertanyaan" runat="server" />
                            </div>
                            <div style="text-align:right; margin:auto">
                                <asp:Button ID="btPilih" runat="server" Text="Pilih" CssClass="btn btn-primary" OnClick="btPilih_Click" />
                            </div>
                        </div>

                        <asp:GridView ID="gvDetailPertanyaan" runat="server" CellSpacing="-1" GridLines="None" CssClass="table table-hover" AutoGenerateColumns="false" OnRowCommand="gvDetailPertanyaan_RowCommand" DataKeyNames="detail_pertanyaan" AllowPaging="true" OnPageIndexChanging="gvDetailPertanyaan_PageIndexChanging" PageSize="10">
                            <Columns>
                                <asp:TemplateField HeaderStyle-Width="70px" HeaderText="NO"> 
                                    <ItemTemplate> 
                                        <%# Container.DataItemIndex + 1 %>. 
                                    </ItemTemplate> 
                                    <ItemStyle HorizontalAlign="Right" /> 
                                </asp:TemplateField>
                            
                                <asp:BoundField DataField="pertanyaan" HeaderText="PERTANYAAN" />
                                <asp:ButtonField CommandName="deleteRecord" Text="<span class='glyphicon glyphicon-remove'></span> DELETE" ButtonType="Link" HeaderStyle-Width="90px" />
                            </Columns>
                            <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast" PageButtonCount="5" NextPageText="Next" PreviousPageText="Prev" position="Bottom" />
                            <PagerStyle HorizontalAlign = "Center" CssClass = "GridPager" />
                        </asp:GridView>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>

        <div id="deleteModal" class="modal fade">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h4 class="modal-title"><span class="glyphicon glyphicon-trash"></span> Hapus Pertanyaan</h4>
                        </div>
                        <asp:UpdatePanel ID="upDelete" runat="server">
                            <ContentTemplate>
                                <div class="modal-body">
                                    <p>Anda yakin ingin menghapus pertanyaan ini?</p><asp:HiddenField ID="hfDeleteID" runat="server" />
                                </div>
                                <div class="modal-footer">
                                    <button type="button" class="btn btn-default" data-dismiss="modal">Batal</button>
                                    <asp:Button ID="btDeletePengaturanPertanyaan" runat="server" Text="Hapus" CssClass="btn btn-primary" OnClick="btDeletePengaturanPertanyaan_Click" />
                                </div>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="btDeletePengaturanPertanyaan" EventName="Click" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </div>
                </div>
            </div>

        <div id="footer">
            <div class="container">
                <p class="text-muted">&copy; <%: DateTime.Now.Year.ToString() %> Rezki Wulan Permata Sari</p>
            </div>
        </div>
    </form>
</body>
</html>
